//定义的接口请求
import instance from './request'

export function loginApi(params){
    return instance({
        method:'post',
        url:'/login',
        data:params
    })
}

//权限请求接口
export function pressApi(params){
    return instance({
        method:'post',
        url:'/getpress',
        data:params
    })
}

// 获取首页柱形图接口数据
export function getBarData(params) {
    return instance({
        url: '/getBarData',
        method: 'get',
        params: params
    })
}
// 获取首页饼形图接口数据
export function getPieData(params) {
    return instance({
        url: '/getPieData',
        method: 'get',
        params: params
    })
}

//用户数据
export function getuserlist(params){
    return instance({
        method:'post', 
        url:'/getUserList',
        data:params
    })
}
//删除用户信息
export function deleteuser(params) {
    return instance({
        url: '/deleteUser',
        method: 'get',
        params: params
    }) 
}
//修改
export function edituser(params) {
    return instance({
        url: '/editUser',
        method: 'post',
        data: params
    }) 
}
//增加
export function adduser(params) {
    return instance({
        url: '/addUser',
        method: 'post',
        data: params
    }) 
}